package hr.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import hr.entity.DO.*;
import hr.entity.Department;
import hr.entity.vo.ObtainDepartment;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 部门信息表 Mapper 接口
 * </p>
 *
 * @author zzh
 * @since 2023-12-04
 */
@Mapper
public interface DepartmentMapper extends BaseMapper<Department> {

    List<DepartmentEmployeeDO> selectAllDepartments(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize,@Param("obj") ObtainDepartment obtainDepartment);

    /**
     * 查询分页信息
     * @return
     */
    ObtainDepartment selectPagingInformation();

    int checkDepartmentIdCanDelete(@Param("departmentId") Integer departmentId);


    public List<DepartmentEmployeeMapDO> selectAllDepartmentsNoArgs();

    // @MapKey("")
    List<Map<String, Object>> selectPosition();

    List<Map<String, Object>> getDepartmentPeoples();
}
